<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('merchants', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('keyword_search_id')->comment('关键词编号');
            $table->string('map')->comment('地图');
            $table->string('title')->comment('商家名称');
            $table->string('category')->comment('商家类型');
            $table->string('tel')->comment('商家电话');
            $table->string('address')->nullable()->comment('商家地址');
            $table->string('province')->nullable()->comment('省份');
            $table->string('city')->nullable()->comment('城市');
            $table->string('district')->nullable()->comment('区域');
            $table->string('latitude')->nullable()->comment('纬度');
            $table->string('longitude')->nullable()->comment('经度');
            $table->timestamps();
            $table->softDeletes();
            $table->comment('商家表');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('merchants');
    }
};
